import http from '@/services/umiRequest';

const DragApi = {
  save: (params: any) => http.post('/bpm/api/from/save', { data: params }),

  info: (params: any) => http.get('/bpm/api/from/info?id=' + params),

  startProcess: (params: any) => http.post('/bpm/api/leaveProcess/start', { data: params }),

  customRequest: ({ url, method, body, header }: any) => http[method.toLowerCase()](url, {
    data: body,
    Headers: header
  })
}

export default DragApi;
